By default, mutter doesn't pass events to clutter. We need to add an
xevent_filter method to our plugin and do that ourselves.
svn path=/trunk/; revision=7
#include <glib/gi18n-lib.h>
#include <clutter/clutter.h>
+#include <clutter/x11/clutter-x11.h>
#include <gjs/gjs.h>
#include <gmodule.h>
#include <string.h>
static gboolean do_init (const char *params);
static gboolean reload (const char *params);
+static gboolean xevent_filter (XEvent *xev);
/*
* Create the plugin struct; function pointers initialized in
/* The reload handler */
plugin->reload = reload;
+ /* Event handling */
+ plugin->xevent_filter = xevent_filter;
+
return NULL;
}
return FALSE;
}
+static gboolean
+xevent_filter (XEvent *xev)
+{
+ return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
+}
+
/*
* GModule unload function -- do any cleanup required.
*/